from math import isqrt
from time import time

def is_prime(x):
    if x == 2:
        return True
    if x % 2 == 0:
        return False
    d = 3
    while d * d < x:
        if x % d == 0:
            return False
        d += 2
    return True

a = 101000000
b = 102000000

begin_time = time()
for x in range(a, b + 1, 2):
    if is_prime(isqrt(x // 2)) and isqrt(x // 2) ** 2 == x // 2:
        print(x, time() - begin_time)
